package javaClassExercise.referencesSort;

import java.util.Comparator;

/**
 * Created by lomo on 2017/3/18.
 */


//User类的排序
public class UserComparator implements Comparator<User> {

    @Override
    public int compare(User o1, User o2) {
        return o1.getAge() - o2.getAge();
    }

}
